package com.example.haojiutao.service;

import com.example.haojiutao.common.Result;
import com.example.haojiutao.model.domain.Goods;

import java.util.List;

/**
 * @Description: 商品业务层
 * @Author: ma_lihong
 * @CreateTime： 2023/9/21 20:02
 */

public interface GoodsService {
    /*
     * @Description:出售闲置
     * @Author: ma_lihong
     * @CreateTime: 2024/1/16 19:38
     * @param: goods
     * @return: com.example.haojiutao.common.Result
     */
    Result insertGoods(Goods goods);
    /*
     * @Description:更新商品价格，图片，详情，品牌
     * @Author: ma_lihong
     * @CreateTime: 2024/1/16 19:39
     * @param: goods
     * @return: com.example.haojiutao.common.Result
     */
    Result updateGoods(Goods goods);
    /*
     * @Description:更新商品价格，图片，详情，品牌
     * @Author: ma_lihong
     * @CreateTime: 2023/9/22 19:39
     * @param: goods
     * @return: com.example.haojiutao.common.Result
     */
    Result deleteById(int goodsId);
    /*
     * @Description:根据商品名称搜索商品
     * @Author: ma_lihong
     * @CreateTime: 2024/1/17 21:04
     * @return: com.example.haojiutao.common.Result
     */
    List<Goods> selectByName(Goods goods);
    /*
     * @Description: 查看单个物品，根据id查询
     * @Author: ma_lihong
     * @CreateTime: 2024/1/18  14:21
     * @param: goods
     * @return: com.example.haojiutao.common.Result
     */
    Goods selectById(int goodsId);
//查看我卖出的商
    List<Goods> getRecommendbuy(Goods goods);

    Result addGoods(Goods goods);


    Goods getGoodsByUserId(Goods goods);
//查看我发布的商品
List<Goods> getRecommendFabu(Goods goods);

//List<Goods> getRecommendFabu(Goods goods);

    //上架
    Result listGoods(Integer goodsId);
    //下架
    Result delistById(Integer goodsId);
}
